All Questions
3 questions
4votes
2answers
356views
Find max element in increasing-decreasing array
Question: Find the largest in a list that list is stored as two sections, one in ascending order and the other in descending order. Elements are distinct. E.g: Input ...
2votes
3answers
469views
Minimum element in a sorted rotated array
A sorted array [0,1,2,3,4,5] when rotated n times (3 times in this case) becomes [3,4,5,0,1,2], meaning elements in the front move to the end. The code below finds the minimum element in this array, ...
156votes
20answers
32kviews
Searching an element in a sorted array
I was applying for a position, and they asked me to complete a coding problem for them. I did so and submitted it, but I later found out I was rejected from the position. Anyways, I have an eclectic ...